using System;

namespace MSTestExtensions
{
    /// <remarks />
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments"), AttributeUsage(AttributeTargets.Method)]
    public sealed class TestTimerAttribute : Attribute
    {
        #region Fields

        /// <remarks />
        private TimeSpan _testLength;

        #endregion // Fields

        #region Constructors

        /// <remarks />
        public TestTimerAttribute(int hours, int minutes, int seconds, int milliseconds)
        {
            _testLength = new TimeSpan(0, hours, minutes, seconds, milliseconds);
        }

        /// <remarks />
        public TestTimerAttribute(int minutes, int seconds, int milliseconds)
        {
            _testLength = new TimeSpan(0, 0, minutes, seconds, milliseconds);
        }

        /// <remarks />
        public TestTimerAttribute(int seconds, int milliseconds)
        {
            _testLength = new TimeSpan(0, 0, 0, seconds, milliseconds);
        }

        /// <remarks />
        public TestTimerAttribute(int milliseconds)
        {
            _testLength = new TimeSpan(0, 0, 0, 0, milliseconds);
        }

        #endregion // Constructors

        #region Properties

        /// <remarks />
        public TimeSpan TestLength
        {
            get { return _testLength; }
        }

        #endregion // Properties
    }
}
